package com.mall.service;

import java.sql.SQLException;
import java.util.List;

import com.ibatis.dao.client.DaoManager;
import com.mall.ibatis.bean.Goods;
import com.mall.ibatis.bean.JqgridParams;
import com.mall.ibatis.persistence.DaoConfig;
import com.mall.ibatis.persistence.iface.GoodsDao;

public class GoodsService {
	private DaoManager daoManager = DaoConfig.getDaomanager();
	
	GoodsDao gsDao;
	
	public GoodsService(){
		gsDao = (GoodsDao) daoManager.getDao(GoodsDao.class);
		
	}

	public List<Goods> showGoods(JqgridParams params) {
		return gsDao.showGoods(params);
	}

	public int showGoodsCount(JqgridParams params) {
		return gsDao.showGoodsCount(params);
	}

	public int addgs(Goods gs) {
		return gsDao.addgs(gs);
		
	}

	public String deleteGoods(String rowID) throws SQLException {
		return gsDao.deleteGoods(rowID);
	}

	public String saveGoods(List<Goods> gsList) {
		return gsDao.saveGoods(gsList);
	}

}
